﻿using System;
using System.Collections.ObjectModel;
using JTLeigh.Commerce.Spencer.Core.Common.Entities;

namespace JTLeigh.Commerce.Spencer.Core.Business
{

	/// <summary>
	/// Delegate used to retrieve a collection of associations by category identifier.
	/// </summary>
	/// <typeparam name="TAssociation">An association class inheriting from <see cref="AssociationBase"/>.</typeparam>
	/// <param name="categoryId">The category identifier <see cref="String"/> of the category whose
	/// associations are to be returned.</param>
	/// <returns>A <see cref="Collection{TEntry}"/> of <typeparamref name="TAssociation"/> keyed by
	/// associated item identifier <see cref="Guid"/>.</returns>
	public delegate Collection<TAssociation> GetCategoryAssociations<TAssociation>(string categoryId)
		where TAssociation : AssociationBase;

}
